import request from '@/utils/request'

// 查询升级包列表
export function listFirmware(query) {
  return request({
    url: '/upgrade/firmware/list',
    method: 'get',
    params: query
  })
}

// 查询升级包详细
export function getFirmware(id) {
  return request({
    url: '/upgrade/firmware/' + id,
    method: 'get'
  })
}

// 新增升级包
export function addFirmware(data) {
  return request({
    url: '/upgrade/firmware',
    method: 'post',
    data: data
  })
}

// 修改升级包
export function updateFirmware(data) {
  return request({
    url: '/upgrade/firmware',
    method: 'put',
    data: data
  })
}

// 删除升级包
export function delFirmware(id) {
  return request({
    url: '/upgrade/firmware/' + id,
    method: 'delete'
  })
}
